<template>
	<view class="content">
		<view class="main">
			<swiper class="swiper" indicator-dots autoplay circular :interval="3000" :duration="500"
			indicator-color="#DCDCDC"
			indicator-active-color="#FFFFFF"
			>
				<swiper-item v-for="(a,b) in list" :key="b" @click="onWebView(a)">
					<image :src="a.img"></image>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default{
    props:{
      list:{
        type:Array,
        required:true,
      }
    },
		data(){
			return {
			}
		},
		methods: {
			//跳转列表对应页面
			onWebView(item){
        this.$emit('click',item)
			}
		}
	}
</script>

<style lang="scss" scoped>
.content{
	padding: 20rpx;
	.main{
		height: 300rpx;
		background: #F1F8FF;
		border-radius: 20rpx;
		.swiper{
			height: 100%;
			border-radius: 15rpx;
			overflow: hidden;
			transform: translateY(0);
			.uni-swiper-dot{
				width: 12rpx;
				height: 12rpx;
				border-radius: 50%;
			}
		}
		image{
			width: 100%;
			height: 100%;
			border-radius: 15rpx;
		}
	}
}
</style>
